/*
 * GET users listing.
 */
function getBase(req, res){
    var Client = require('mysql');
    var client = Client.createConnection({
        user:'root',
        password:'password'
    });
    client.connect();
    client.query('use blog');
    client.query('SELECT * from base_data;',function selectCb(err, results, fields) {
        if (err) {
            throw err;
        }
        console.log(results);
        console.log(fields);
        res.render('basedata', {
            results: results
        });
        //res.send("respond with a resource");
        client.end();
    });
}


exports.list = function (req, res) {
    getBase(req, res);
};